-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve popup position #10257
Improve popup position #10257
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks pretty promising. I left some comments but I didn't have time to read trough everything I detail yet.
e7e7099
to
c8a6746
Compare
Judging from your video there is either an existing bug or something new introduced with this PR going on. The signature help should be hidden automatically if it interests with the completions. In stead case the completion doc popup seem to overlap. |
yes I saw that, I will check it and try to fix it |
969d591
to
f37c35b
Compare
4f8044a
to
38b7815
Compare
Until now the the current solution is more responsive when comes to hide/show the popups. (I have update the video in the PR description) |
hmm I don't love that. I get why you implemented it that way, there is no other way to share this information and it may change at any point due to resizing. I am not a fan of that tough. I want to really stop adding ad-hoc fields to For example one possibility could be that we use either somekind of popup container that manages all open popus to hide overlapping popups (or do it in the compositor directly that's really where that kind of thing belongs IMO). The first step for that is turning the completions menu into a proper component instead of the spaghetti code we currently have (that is a historical artifact that I think is not necessary anymore now with the event system). I am already working on that in a much larger PR that makes manly changes to the completion menu (the refactor there started for unrelated reasons but I see now that its really the right change anyway) There could also be other approaches I have some ideas but I think all of them will involve larger changes. I don't think you need to tackle that here. Ther rest of the PR is a nice not too large change so I would prefer to just revert the changes you made to the signature help popup and rather merge this as is. Sorry for not thinking about that earlier when I made that comment I thaught that was maybe a new regression with this PR. |
38b7815
to
2ff215a
Compare
I reverted as you asked.
we can put the field directly under
I thought about a
nice then I will wait for your PR first before making further changes
yes it is not. Th regression appears only if there no space except in top, and the window must be very small. So I think this PR is still improving the popup positions much. (In my screen I never encounter it.) I am thinking of creating a new PR to add some key binding to toggle on/off the Signature Popup. Sometimes it is annoying. DO you know if it is possible to toggle off the Signature popup in helix? |
2ff215a
to
c00cf5d
Compare
@pascalkuthe there is bug, which also exists in the master branch.
this panic actually can happen, if the popup is open and console area get smaller. (I got this somehow while dragging the console.) I have already fixed this. I prefer to keep the changes as small as possible to get MRs merged quickly, (especially there is an approve now 😄 ) should I add some commits to this MR or better wait until this get merged? |
can you push them to a seperate branch and link them? It should really be a bug in whatever component is embedded inside the popup rather than popup itself. |
done #10507. it shows much changes, because this commit is included there. |
c00cf5d
to
6ec9665
Compare
Make the popup positions more consistent. Improvements: 1. if the signature popup content is bigger than the available space, then the popup is always shown under the cursor, even if there more space above the cursor than below 2. There is no mutation anymore inside required_size. Maybe in the future we can update all widgets to have no mutations and change the trait Signed-off-by: Ben Fekih, Hichem <[email protected]>
6ec9665
to
1698ffa
Compare
to speed up the rendering a little Signed-off-by: Ben Fekih, Hichem <[email protected]>
1698ffa
to
5deff63
Compare
as request move the commit 5deff63 to this PR. I didn't modify the other one |
Make the popup positions more consistent.
Improvements:
the following is the new behavior
IMO this make at least the completion dialog consistent and will be shown always bellow the cursor.
Edit: Video Updated